﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Web;
using WCFPointOfSaleService.Entities;
using WCFPointOfSaleService.Entities.Parameters;

namespace WCFPointOfSaleService
{
    [ServiceContract]
    public interface IOrderService
    {
        [OperationContract]
        [WebInvoke(UriTemplate = "/CreateInvoice",
            RequestFormat = WebMessageFormat.Json,
            ResponseFormat = WebMessageFormat.Json, 
            Method = "POST")]
        ObjectResult<OrderResultList> CreateInvoice(ParamOrderWithDetail param);

        [OperationContract]
        [WebInvoke(UriTemplate = "/StartEmailSendingProcess?companyId={companyId}&username={username}",
            ResponseFormat = WebMessageFormat.Json,
            BodyStyle = WebMessageBodyStyle.Bare, 
            Method = "GET")]
        Entities.ObjectResult<object> StartEmailSendingProcess(int companyId, string username);

    }
}